package com.hqizcc.ltcs.hqbsltcs.controller;

import com.hqizcc.ltcs.hqbsltcs.service.GetCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class GetCityController {

    @Autowired
    private GetCityService getCityService;

    @RequestMapping(value = "getCity")
    public String getCity(){

        boolean result = getCityService.getCity();

        if (result){

            System.out.println("爬取城市成功");

            return "index";

        } else {
            System.out.println("爬取失败");
            return "error";
        }

    }

}
